package com.java.pay.controller;


import com.java.common.vo.R;
import com.java.pay.entity.PaymentType;
import com.java.pay.service.PaymentTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 支付类型表 前端控制器
 * </p>
 *
 * @author jiangli
 * @since 2019-12-15
 */
@RestController
@RequestMapping("/pay")
public class PaymentTypeController {
	@Autowired
	private PaymentTypeService paymentTypeService;

	@GetMapping("/getPaymentType")
	public ResponseEntity<PaymentType> getPaymentTypeById(@RequestParam("id") Long id){
		PaymentType paymentType = paymentTypeService.getById(id);
		return ResponseEntity.ok(paymentType);
	}

}

